package com.codedancer.campus.client.api.commentReport;

import cn.hutool.core.bean.BeanUtil;
import com.codedancer.campus.client.service.ICommentReportTypeService;
import com.codedancer.campus.client.service.vo.commentReport.CommentReportTypeVo;
import com.codedancer.campus.common.core.BaseApi;
import com.codedancer.campus.common.response.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/comment-report-type")
@CrossOrigin(methods = {RequestMethod.GET, RequestMethod.POST, RequestMethod.DELETE,
    RequestMethod.PUT}, maxAge = 3600)
@Api(value = "评论举报类型Api", description = "评论举报类型Api", tags = "评论举报类型Api")
public class CommentReportTypeApi extends BaseApi {

  @Autowired
  private ICommentReportTypeService commentReportTypeService;

  @GetMapping("/list")
  @ApiOperation("获取全部评论举报类型")
  public ApiResponse<List<CommentReportTypeVo>> list() {
    return success(commentReportTypeService.list());
  }
}
